#include "Head.h"

vector<string> Item;
int Item_Num=0;
vector<string> & File(string & filename)
{
	string s;
	string word;
	string separate(" ,\t:\v\r\n\f");                    
	string ::size_type startpos=0,endpos=0;
	ifstream in(filename);
	if(!in.is_open())
		exit(1);
	while(!in.eof())
	{
		Item_Num++;
		getline(in,s);
		s=s+"\n";
		while ((startpos=s.find_first_not_of(separate,endpos))!=string::npos)
		{
			endpos=s.find_first_of(separate,startpos);
			word.assign(s.begin()+startpos,s.begin()+endpos);
			Item.push_back(word);
		}
		endpos=0;
		s.clear();
	}
	in.close();
	return Item;
}